﻿<!DOCTYPE html>
<html lang="ch">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<meta http-equiv = "pragma" content = "no-cache">
<meta http-equiv = "Cache-Control" content = "no-cache,must-revalidate">
<meta http-equiv = "expires" content = "0">
		<title>淘车网-优质二手车交易平台</title>

	    <!-- css -->
		 
		<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />
        <link rel="stylesheet" href=" fenye/css/vendor/normalize.css" />
		<link rel="stylesheet" href=" fenye/css/styles.min.css" />
        <link href=" fenye/img/common/favicon.png" rel="shortcut icon" />
		<link href="fenye/css/jplist.min.css" rel="stylesheet" type="text/css" />
		
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
		<link rel="stylesheet" type="text/css" href="css/reality-icon.css">
		<link rel="stylesheet" type="text/css" href="css/bootsnav.css">
		<link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css">
		<link rel="stylesheet" type="text/css" href="css/owl.carousel.css">
		<link rel="stylesheet" type="text/css" href="css/owl.transitions.css">
		<link rel="stylesheet" type="text/css" href="css/cubeportfolio.min.css">
		<link rel="stylesheet" type="text/css" href="css/settings.css">
		<link rel="stylesheet" type="text/css" href="css/range-Slider.min.css">
		<link rel="stylesheet" type="text/css" href="css/search.css">
		<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- js -->		
        <script src="js/jquery-2.1.4.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script type="text/javascript">
			window.onload = function() {	
				var action = "/getUserInfo";
				$.get(
					action,
					function(data) {
						var user_info = data;
						var old = '';
						if(user_info.name==null||user_info.userTypeId != '3'){
							window.location.href='login.html';
						}
						else{
							old += '<ul class="nav navbar-nav" data-in="fadeIn" data-out="fadeOut"><li><a href="index.html">首页</a></li><li class="dropdown megamenu-fw active"><a href="favorite.html">收藏夹</a></li><li><a href="userInfo.html">个人中心</a></li><li><a href="javascript:void(0);" onclick="logout()">退出登录</a></li></ul>';
						$("#navbar-menu").html(old);
					
										var cookieid = user_info.cookieid;
										cookieid = cookieid.replace(/\+/g, '%2B');
										action = "/getFavoriteList";
										$.get(
												action,
												function(data) {
												var old = $("#resultList").html();
												var list = data;
												
												for (i in list) {
													var item = list[i];
													if(list.length<1){
														$("#noResult").html('<p>这里空空如也...</p>');
													}
													if (item.name.length > 45) {
														item.name = item.name.substr(0, 42) + "...";
													}
													var subtitle = item.shangpai.substr(0, 4) + "年·" + item.licheng + "公里";
													old =
														old +
														" <div class=\"col-sm-6 list-item box\"><div class=\"property_item heading_space\"><div class=\"image\"><a href=\"detail.html?pid="+item.pid+"\" onclick=\"details(" +
														item.pid + ")\"\"><img src=" +
														item.src +
														" height=\"364\"width=\"254\" alt=\"latest property\" class=\"img-responsive\"></a><div class=\"price clearfix\"></div></div><div class=\"proerty_content\"><div class=\"proerty_text\"><h4 class=\"captlize\"><a href=\"detail.html?pid="+item.pid+"\" onclick=\"details(" +
														item.pid + ")\">" +
														item.name +
														"</a></h4><p><span style=\"font-size:15px\">" +
														subtitle +
														"</span></p><span style=\"font-size:30px;color:#F00\"  class=\"like\">" + item.price +
														"</span><span style=\"font-size:15px;color:#F00\">万</span></div></div></div></div>";
												}
												$("#resultList").html(old);
												$('#demo').jplist({
													
													itemsBox: '.list' 
													,itemPath: '.list-item' 
													,panelPath: '.jplist-panel'
													
													//save plugin state
													,storage: 'localstorage' //'', 'cookies', 'localstorage'			
													,storageName: 'jplist-div-layout'
												});			
											});
									}
								});

				

			};
		</script>
		<script src=" fenye/js/vendor/modernizr.min.js"></script>
		<script src="fenye/js/jplist.min.js"></script>
    </head>
    <body>
	
<!--Header-->
		<header class="layout_default">

			<nav class="navbar navbar-default navbar-sticky bootsnav">
				<div class="container">
					<div class="row">
						<div class="col-md-12">
							<!-- Start Header Navigation -->
							<div class="navbar-header">
							</div> <!-- End Header Navigation -->
							<div class="collapse navbar-collapse" id="navbar-menu">
							</div>
						</div>
					</div>
				</div>
			</nav>
		</header>
		<!--Header Ends-->



		<!-- Listing Start -->

		<section id="listing1" class="listing1 padding_top">
			<div class="container" id="show-panel">
				<div class="row">
					<div >
					
					<!-- demo -->
					<div id="demo" class="box jplist">
					
						<!-- ios button: show/hide panel -->
						<div class="jplist-ios-button">
							<i class="fa fa-sort"></i>
							jPList Actions
						</div>
						
						<!-- panel -->
						<div class="jplist-panel box panel-top">						
							
							<!-- items per page dropdown -->
							<div 
								
								data-control-type="drop-down" 
								data-control-name="paging" 
								data-control-action="paging">
								<ul>
									<li><span data-number="8" data-default="true"> &ensp;</span></li>
								</ul>
							</div>
							
							<!-- sort dropdown -->
							<div 
								class="jplist-drop-down" 
								data-control-type="drop-down" 
								data-control-name="sort" 
								data-control-action="sort"
								data-datetime-format="{month}/{day}/{year}"> <!-- {year}, {month}, {day}, {hour}, {min}, {sec} -->

								<ul>
									<li><span data-path="default" data-default="true">排序方式</span></li>
									<li><span data-path=".like" data-order="asc" data-type="number">价格升序</span></li>
									<li><span data-path=".like" data-order="desc" data-type="number">价格降序</span></li>
								</ul>
							</div>
							
							
							<!-- pagination results -->
							<div 
								class="jplist-label" 
								data-type="第{current}页 ，总 {pages}页" 
								data-control-type="pagination-info" 
								data-control-name="paging" 
								data-control-action="paging">
							</div>
								
							<!-- pagination -->
							<div 
								class="jplist-pagination" 
								data-control-type="pagination" 
								data-control-name="paging" 
								data-control-action="paging">
							</div>
							
						</div>
						
						
						<!-- data -->   
						<div class="list box text-shadow">
						<div class="row" id="resultList">

						</div>
							
						</div>	
						
						<div class="box jplist-no-results text-shadow align-center" id="noResult">
							<p>这里似乎空空如也...</p>
						</div>
						
						<!-- ios button: show/hide panel -->
						<div class="jplist-ios-button">
							<i class="fa fa-sort"></i>
							jPList Actions
						</div>
						
						<!-- panel -->
						<div class="jplist-panel box panel-bottom">

							
							<!-- pagination results -->
							<div 
								class="jplist-label" 
								data-type="{start} - {end} ,总{all}条结果"
								data-control-type="pagination-info" 
								data-control-name="paging" 
								data-control-action="paging">
							</div>

								
							<!-- pagination -->
							<div 
								class="jplist-pagination" 
								data-control-animate-to-top="true"
								data-control-type="pagination" 
								data-control-name="paging" 
								data-control-action="paging">
							</div>
							
						</div>
					</div>
					<!-- end of demo -->
</div>							

				</div>
			</div>
		</section>
		<h2>&ensp;</h2>
		<!-- footer -->
		<footer class="box" id="footer">
			<div class="center">			
                <div class="box">
				
					<p class="align-center" id="footer-content">
						Copyright &copy;  2020 <a href="index.html" title="">TaoCheNet</a>
					</p>
					
				</div>
			</div>
		</footer>	
		<script src="js/jquery.appear.js"></script>
		<script src="js/jquery-countTo.js"></script>
		<script src="js/bootsnav.js"></script>
		<script src="js/masonry.pkgd.min.js"></script>
		<script src="js/jquery.parallax-1.1.3.js"></script>
		<script src="js/jquery.cubeportfolio.min.js"></script>
		<script src="js/range-Slider.min.js"></script>
		<script src="js/owl.carousel.min.js"></script>
		<script src="js/selectbox-0.2.min.js"></script>
		<script src="js/zelect.js"></script>
		<script src="js/jquery.fancybox.js"></script>
		<script src="js/jquery.themepunch.tools.min.js"></script>
		<script src="js/jquery.themepunch.revolution.min.js"></script>
		<script src="js/revolution.extension.actions.min.js"></script>
		<script src="js/revolution.extension.layeranimation.min.js"></script>
		<script src="js/revolution.extension.navigation.min.js"></script>
		<script src="js/revolution.extension.parallax.min.js"></script>
		<script src="js/revolution.extension.slideanims.min.js"></script>
		<script src="js/revolution.extension.video.min.js"></script>
		<script src="js/custom.js"></script>
		<script src="js/functions.js"></script>
		<script src="layui/layui.js"></script>
		<script>
			function logout(){
				var url = '/logout';
				$.get(
						url,
						function(data) {
						if(data==1){
							window.location.reload();
						}
						if(data==0){
							alert('退出有误！');
						}
						}
						);
			};
		</script>
	</body>
</html>
